<template>
  <div class="app-container">
    <el-dialog title="收支明细" :visible.sync="dialogVisible" width="60%" append-to-body>
      <el-table
        v-loading="loading"
        :data="list"
      >
        <el-table-column type="index" label="序号" align="center">
          <template slot-scope="scope">
            <span>{{ (form.pageNum - 1) * form.pageSize + scope.$index + 1 }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="paymentName" label="单据编号" align="center"/>
        <el-table-column prop="paymentCode" label="单据日期" align="center"/>
        <el-table-column prop="original" label="单据类型" align="center"/>
        <el-table-column prop="income" label="往来单位类型" align="center"/>
        <el-table-column prop="outcome" label="往来客户" align="center"/>
        <el-table-column prop="balance" label="收款金额(元)" align="center"/>
        <el-table-column prop="balance" label="付款金额(元)" align="center"/>
        <el-table-column prop="createTime" label="余额(元)" align="center"/>
        <el-table-column label="操作" align="center" width="80">
          <template slot-scope="scope">
            <el-button
              type="text"
              @click="updateRow(1,scope.row)"
            >删除
            </el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination
        :total="total"
        :page.sync="form.pageNum"
        :limit.sync="form.pageSize"
        @pagination="getList"
      />
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible=false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>

export default {
  data() {
    return {
      loading: false,
      dialogVisible: false,
      form: {
        pageNum: 1,
        pageSize: 10
      },
      list: [],
      total: 0
    }
  },
  methods: {
    show(form) {
      this.dialogVisible = true
      this.resetForm('form')
    },
    getList() {
    },
    updateRow() {
    },
  }
}
</script>
